﻿using System;

namespace Teigha.Core
{
	public class OdDbBaseDatabasePE_Internal : OdDbBaseDatabasePE
	{
		public OdDbBaseDatabasePE_Internal(IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
		{
		}

		public override OdDbBaseHostAppServices appServices(OdRxObject pDb)
		{
			OdDbBaseHostAppServices result = (OdDbBaseHostAppServices)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdDbBaseDatabasePE_appServices(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(pDb)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override string getFilename(OdRxObject pDb)
		{
			string result = GlobalsPINVOKE.OdDbBaseDatabasePE_getFilename(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(pDb));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void startTransaction(OdRxObject pDb)
		{
			GlobalsPINVOKE.OdDbBaseDatabasePE_startTransaction(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(pDb));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void abortTransaction(OdRxObject pDb)
		{
			GlobalsPINVOKE.OdDbBaseDatabasePE_abortTransaction(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(pDb));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override OdGiDefaultContext createGiContext(OdRxObject pDb)
		{
			OdGiDefaultContext result = (OdGiDefaultContext)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdDbBaseDatabasePE_createGiContext(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(pDb)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdBaseTextIterator createTextIterator(OdRxObject db, string textString, int length, bool raw, OdGiTextStyle pTextStyle)
		{
			OdBaseTextIterator result = (OdBaseTextIterator)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdDbBaseDatabasePE_createTextIterator(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(db), textString, length, raw, OdGiTextStyle.getCPtr(pTextStyle)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdGsDevice setupActiveLayoutViews(OdGsDevice pDevice, OdGiDefaultContext pGiCtx)
		{
			OdGsDevice result = (OdGsDevice)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdDbBaseDatabasePE_setupActiveLayoutViews(OdDbBaseDatabasePE.getCPtr(this), OdGsDevice.getCPtr(pDevice), OdGiDefaultContext.getCPtr(pGiCtx)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdGsDevice setupLayoutView(OdGsDevice arg0, OdGiDefaultContext arg1, OdDbStub arg2)
		{
			OdGsDevice result = (OdGsDevice)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdDbBaseDatabasePE_setupLayoutView(OdDbBaseDatabasePE.getCPtr(this), OdGsDevice.getCPtr(arg0), OdGiDefaultContext.getCPtr(arg1), OdDbStub.getCPtr(arg2)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdDbStub getNextViewForActiveLayout(OdGiDefaultContext arg0, OdDbStub arg1)
		{
			IntPtr intPtr = GlobalsPINVOKE.OdDbBaseDatabasePE_getNextViewForActiveLayout(OdDbBaseDatabasePE.getCPtr(this), OdGiDefaultContext.getCPtr(arg0), OdDbStub.getCPtr(arg1));
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void applyLayoutSettings(OdGsDCRect clipBox, OdGsDevice pDevice, OdRxObject db)
		{
			GlobalsPINVOKE.OdDbBaseDatabasePE_applyLayoutSettings(OdDbBaseDatabasePE.getCPtr(this), OdGsDCRect.getCPtr(clipBox), OdGsDevice.getCPtr(pDevice), OdRxObject.getCPtr(db));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void zoomToExtents(OdGsDCRect outputRect, OdGsDevice pDevice, OdRxObject db, bool exactExtents, OdDbStub objectId)
		{
			GlobalsPINVOKE.OdDbBaseDatabasePE_zoomToExtents__SWIG_0(OdDbBaseDatabasePE.getCPtr(this), OdGsDCRect.getCPtr(outputRect), OdGsDevice.getCPtr(pDevice), OdRxObject.getCPtr(db), exactExtents, OdDbStub.getCPtr(objectId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void zoomToExtents(OdGsDCRect outputRect, OdGsDevice pDevice, OdRxObject db, bool exactExtents)
		{
			GlobalsPINVOKE.OdDbBaseDatabasePE_zoomToExtents__SWIG_1(OdDbBaseDatabasePE.getCPtr(this), OdGsDCRect.getCPtr(outputRect), OdGsDevice.getCPtr(pDevice), OdRxObject.getCPtr(db), exactExtents);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void zoomToExtents(OdGsDCRect outputRect, OdGsDevice pDevice, OdRxObject db)
		{
			GlobalsPINVOKE.OdDbBaseDatabasePE_zoomToExtents__SWIG_2(OdDbBaseDatabasePE.getCPtr(this), OdGsDCRect.getCPtr(outputRect), OdGsDevice.getCPtr(pDevice), OdRxObject.getCPtr(db));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override void loadPlotstyleTableForActiveLayout(OdGiDefaultContext pDwgContext, OdRxObject db)
		{
			GlobalsPINVOKE.OdDbBaseDatabasePE_loadPlotstyleTableForActiveLayout(OdDbBaseDatabasePE.getCPtr(this), OdGiDefaultContext.getCPtr(pDwgContext), OdRxObject.getCPtr(db));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override OdRxIterator layers(OdRxObject db)
		{
			OdRxIterator result = (OdRxIterator)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdDbBaseDatabasePE_layers(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(db)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdRxObject currentLayout(OdRxObject db)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdDbBaseDatabasePE_currentLayout(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(db)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override void setCurrentLayout(OdRxObject db, string name)
		{
			GlobalsPINVOKE.OdDbBaseDatabasePE_setCurrentLayout(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(db), name);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public override OdRxIterator layouts(OdRxObject db)
		{
			OdRxIterator result = (OdRxIterator)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdDbBaseDatabasePE_layouts(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(db)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdRxObject getLayout(OdRxObject db, string name)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdDbBaseDatabasePE_getLayout(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(db), name), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override bool getLineTypeById(OdRxObject db, OdDbStub pLTypeId, OdGiLinetype LType)
		{
			bool result = GlobalsPINVOKE.OdDbBaseDatabasePE_getLineTypeById(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(db), OdDbStub.getCPtr(pLTypeId), OdGiLinetype.getCPtr(LType));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override bool getTextStyleById(OdRxObject db, OdDbStub idStyle, OdGiTextStyle shapeInfo)
		{
			bool result = GlobalsPINVOKE.OdDbBaseDatabasePE_getTextStyleById(OdDbBaseDatabasePE.getCPtr(this), OdRxObject.getCPtr(db), OdDbStub.getCPtr(idStyle), OdGiTextStyle.getCPtr(shapeInfo));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}
	}
}
